<?php
try {
	$invoice = Invoice::getInvoiceById($_GET['invoiceId']);
	$package = Package::getPackage($invoice['packageId'], true);
	$message = <<<HTML
		type: {$package['type']}<br />
		package name: {$package['name']}<br />
		package info: {$package['info']}<br />
		<a href="old.php?page=invoice&id={$invoice['id']}">ดู invoice</a>
		ติดตั้งเสร็จแล้วแจ้งกลับทางบัญชี <a href="http://p2dc.com/old.php?page=system.successTechnic&invoiceId={$_GET['invoiceId']}">คลิก</a>
HTML;
	Notify::mail(Notify::EMAIL_TECHNIC, "P2DC Alert", $message);
	echo "ส่งอีเมลแจ้งกลับไปยังฝ่ายบัญชีแล้ว";
}
catch (Exception $ex) {
	Log::error($ex->getMessage());
	View::display('error', $ex->getMessage());
	throw $ex;
}